[Misc] Backport JDK-8365811 to fix test/jdk/java/net/CookieHandler/B6644726.java failure - #960
Closed
Accelerator1996 wants to merge 5 commits into
Closed
[Misc] Backport JDK-8365811 to fix test/jdk/java/net/CookieHandler/B6644726.java failure#960Accelerator1996 wants to merge 5 commits into
Accelerator1996 wants to merge 5 commits into
Conversation
Summary: Update dragonwell version Testing: CICD Reviewers: kuaiwei, yuleil Issue: #225
Summary: The depth of object.wait is different with thread.sleep, so we add an extra function for object.wait. Testing: vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames002/ownedMonitorsAndFrames002.java vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames003/ownedMonitorsAndFrames003.java vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames005/ownedMonitorsAndFrames005.java vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames006/ownedMonitorsAndFrames006.java vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames007/ownedMonitorsAndFrames007.java vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames008/TestDescription.java vmTestbase/nsk/jdi/stress/serial/mixed001/TestDescription.java vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames001/TestDescription.java vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames002/TestDescription.java Reviewers: yulei, shuangheng Issue: #952 CR: #953
Accelerator1996
commented
Sep 17, 2025
| @@ -1 +1 @@ | |||
| 11.0.27.24.6-GA No newline at end of file | |||
| 11.0.28.25.6-GA No newline at end of file | |||
Collaborator
Author
There was a problem hiding this comment.
diff --git a/make.sh b/make.sh
index f966ee959d..7996403edc 100755
--- a/make.sh
+++ b/make.sh
@@ -6,7 +6,7 @@ if [ $# != 1 ]; then
fi
# incr by every Dragonwell release
-DRAGONWELL_VERSION=24
+DRAGONWELL_VERSION=25
LC_ALL=C
BUILD_MODE=$1
arch=$(uname -m)
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.java b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.java
index a6c13bcee8..d9134792d2 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.java
@@ -653,7 +653,9 @@ class SleepingThread extends BaseThread {
this.threadsGroupLocks = threadsGroupLocks;
expectedLength += 3;
+ expectedLength += 1; // 1 for wisp
+ expectedMethods.add(Thread.class.getName() + ".sleep0");
expectedMethods.add(Thread.class.getName() + ".sleep");
expectedMethods.add(SleepingThread.class.getName() + ".run");
@@ -720,7 +722,9 @@ class RunningThread extends BaseThread {
this.threadsGroupLocks = threadsGroupLocks;
expectedLength += 2;
+ expectedLength += 1; // 1 for wisp
+ expectedMethods.add(Thread.class.getName() + ".yield0");
expectedMethods.add(Thread.class.getName() + ".yield");
switch (controller.invocationType) {
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/thread/SleepingThread.java b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/thread/SleepingThread.java
index 05e3b9de41..61a0fc52c0 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/thread/SleepingThread.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/thread/SleepingThread.java
@@ -35,6 +35,7 @@ public class SleepingThread extends RecursiveMonitoringThread {
private volatile boolean sleeping = false;
private Object readyLock = new Object();
private static final String[] expectedMethods = {
+ "java.lang.Thread.sleep0",
"java.lang.Thread.sleep",
"nsk.monitoring.share.thread.SleepingThread.runInside"
};
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace001.java b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace001.java
index a0111ad3fc..5ab3b9fa6c 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace001.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace001.java
@@ -139,7 +139,9 @@ public class strace001 {
switch (controller.getInvocationType()) {
case ThreadController.JAVA_TYPE:
expectedTrace = new String[] {
- "java.lang.Thread.sleep"
+ "java.lang.Thread.sleep0"
+ ,"java.lang.Thread.sleep"
+ , "java.lang.Thread.yield0"
, "java.lang.Thread.yield"
, THREAD_NAME + ".waitForSign"
, THREAD_NAME + ".recursionJava"
@@ -149,7 +151,9 @@ public class strace001 {
case ThreadController.NATIVE_TYPE:
expectedTrace = new String[] {
- "java.lang.Thread.sleep"
+ "java.lang.Thread.sleep0"
+ ,"java.lang.Thread.sleep"
+ , "java.lang.Thread.yield0"
, "java.lang.Thread.yield"
, THREAD_NAME + ".waitForSign"
, THREAD_NAME + ".recursionNative"
@@ -159,7 +163,9 @@ public class strace001 {
case ThreadController.MIXED_TYPE:
expectedTrace = new String[] {
- "java.lang.Thread.sleep"
+ "java.lang.Thread.sleep0"
+ ,"java.lang.Thread.sleep"
+ , "java.lang.Thread.yield0"
, "java.lang.Thread.yield"
, THREAD_NAME + ".waitForSign"
, THREAD_NAME + ".recursionNative"
@@ -193,7 +199,7 @@ public class strace001 {
// The method performs checks of the stack trace
private static boolean checkTrace(StackTraceElement[] elements) {
int length = elements.length;
- int expectedLength = depth +3;
+ int expectedLength = depth + 3 + 1; // 1 for wisp
boolean result = true;
// Check the length of the trace. It must not be greater than
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java
index 0ad364e400..68d78aba6e 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java
@@ -228,7 +228,8 @@ public class LockingThread extends Thread {
// synchronizedObjectBlock() // monitor for instance of Object is acquired here
// createStackFrame()
// doWait()
- // relinquishedMonitor.wait()
+ // callWait
+ // relinquishedMonitor.wait()
// LockingThread still holds all other locks because of it didn't exit from corresponding synchronized methods and blocks.
// To let LockingThread acquire relinquished monitor 'relinquishedMonitor.notifyAll()' should be called, after this
@@ -440,7 +441,7 @@ public class LockingThread extends Thread {
// and this method waits when LockingThred change state to 'Thread.State.WAITING'
while (relinquishMonitor)
- relinquishedMonitor.wait(0);
+ callWait(relinquishedMonitor);
log("Acquire relinquished monitor: " + relinquishedMonitor);
} catch (Exception e) {
@@ -460,6 +461,10 @@ public class LockingThread extends Thread {
}
}
+ private void callWait(Object monitor) throws InterruptedException {
+ monitor.wait(0);
+ }
+
public void run() {
// LockingThread call Thread.sleep() when required stack frame was created
requiredState = Thread.State.TIMED_WAITING;
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace003.java b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace003.java
index 496233346a..d0cb15e458 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace003.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace003.java
@@ -117,6 +117,7 @@ public class strace003 {
"java.lang.System.arraycopy",
"java.lang.Object.wait",
"java.lang.Thread.exit",
+ "java.lang.Thread.yield0",
"java.lang.Thread.yield",
"java.lang.ThreadGroup.remove",
"java.lang.ThreadGroup.threadTerminated",
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace004.java b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace004.java
index 8719733e9d..3c0acd2282 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace004.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace004.java
@@ -110,6 +110,7 @@ public class strace004 {
"java.lang.System.arraycopy",
"java.lang.Object.wait",
"java.lang.Thread.exit",
+ "java.lang.Thread.yield0",
"java.lang.Thread.yield",
"java.lang.ThreadGroup.remove",
"java.lang.ThreadGroup.threadTerminated",
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace005.java b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace005.java
index 4f453bb859..6148cdea78 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace005.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace005.java
@@ -136,6 +136,7 @@ public class strace005 {
"java.lang.System.arraycopy",
"java.lang.Object.wait",
"java.lang.Thread.exit",
+ "java.lang.Thread.yield0",
"java.lang.Thread.yield",
"java.lang.ThreadGroup.remove",
"java.lang.ThreadGroup.threadTerminated",
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace006.java b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace006.java
index 07da1a1e33..7ccf7b021e 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace006.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace006.java
@@ -76,6 +76,7 @@ public class strace006 {
"java.lang.System.arraycopy",
"java.lang.Object.wait",
"java.lang.Thread.exit",
+ "java.lang.Thread.yield0",
"java.lang.Thread.yield",
"java.lang.ThreadGroup.remove",
"java.lang.ThreadGroup.threadTerminated",
diff --git a/test/jdk/java/net/CookieHandler/B6644726.java b/test/jdk/java/net/CookieHandler/B6644726.java
index b1caa182d7..cc31f64c1b 100644
--- a/test/jdk/java/net/CookieHandler/B6644726.java
+++ b/test/jdk/java/net/CookieHandler/B6644726.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,8 +46,8 @@ public class B6644726 {
// Let's test the default path
lst.add("myCookie1=foo");
// Then some alternate expires format
- lst.add("myCookie2=bar; path=/dir; expires=Tue, 19 Aug 2025 16:00:00 GMT");
- lst.add("myCookie3=test; path=/dir; expires=Tue Aug 19 2025 16:00:00 GMT-0100");
+ lst.add("myCookie2=bar; path=/dir; expires=Fri, 19 Aug 4242 16:00:00 GMT");
+ lst.add("myCookie3=test; path=/dir; expires=Fri Aug 19 4242 16:00:00 GMT-0100");
// Then Netscape draft cookies and domains
lst.add("myCookie4=test; domain=.sun.com; path=/dir/foo");
HashMap<String, List<String>> map = new HashMap<String, List<String>>();
@@ -64,7 +64,8 @@ public class B6644726 {
List<HttpCookie> cookies = cs.getCookies();
// There should be 5 cookies if all dates parsed correctly
if (cookies.size() != 5) {
- fail("Should have 5 cookies. Got only "+ cookies.size() + ", expires probably didn't parse correctly");
+ fail("unexpected cookies: " + cookies + ", should have 5 cookies. Got only "
+ + cookies.size() + ", expires probably didn't parse correctly");
}
// Check Path for first Cookie
for (HttpCookie c : cookies) {
diff --git a/version.txt b/version.txt
index 0cd21cd015..8967679725 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-11.0.27.24.6-GA
\ No newline at end of file
+11.0.28.25.6-GA
\ No newline at end of file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.